#include <iostream>
#include <algorithm>
#include <string>
#include <cstdio>
#include <vector>
int main(int argc, char const *argv[])
{
    for (int rowblock = 0; rowblock < 7; rowblock += 3)
    {
        for (int colblock = 0; colblock < 7; colblock += 3)
        {
            for (int i = rowblock; i < rowblock + 3; ++i)
            {
                for (int j = colblock; j < colblock + 3; ++j)
                {
                    printf("%d%d ", i, j);
                }
                printf("\n");
            }
        }
    }
    return 0;
}
